{% extends 'base.html' %}
{% from "macro.html" import form_field %}

{% block metas %}
    {{ super() }}
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% endblock %}

{% block styles %}
    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
{% endblock %}
{% block nav %}{% endblock %}

{% macro bsform(f) %}
    <div class="form-group">
        {{ f.label }}
        {% if f.errors %}
            {{ form.id(class='form-control is-invalid') }}
            {% for error in f.errors %}
                <div class="invalid-feedback">
                    {{ error }}
                </div>
            {% endfor %}
        {% else %}
            {{ f(class='form-control',**kwargs) }}
        {% endif %}
    </div>
{% endmacro %}



{% block content %}
    <div class="container">
        <br>
        <h1 class="display-6">注销测试账户</h1>
        <hr>
        {% for message in get_flashed_messages(category_filter=["warning"]) %}
            <div class="alert alert-warning">
                {{ message }}
            </div>
        {% endfor %}
        <form action="{{ url_for("delete_page") }}" method="post">
            {{ form.csrf_token }}
            {{ bsform(form.id) }}
            {{ bsform(form.password) }}
            {{ form.submit(class='btn btn-danger') }}
        </form>
        <br>
        <div class="jumbotron">
            <ul>
                <li>注销后你的信息将会在测试环境永久删除</li>
                <li>本网站对你的信息不做任何副本</li>
                <li>返回<a href="{{ url_for("index") }}">主页</a> </li>
            </ul>
        </div>
    </div>
{% endblock %}

{% block footer %}{% endblock %}
